function [A, b] = gauss2(A, b)
	% triunghiularizare prin eliminare Gauss
	% Intrari :
	% A = matrice sistem
	% b = vector termeni liberi
	% Iesiri :
	% A = matrice sistem superior triunghiular
	% b = termeni liberi sistem triunghiular
	[n, n] = size(A);
	for p=1:n-1
		[ t, A( :, p ) ] = VecG1(A( :, p ));

		for j =2 :  n
			A( :,j ) = TG1( A( :, j ), t);
		endfor

		b = TG1( b, t);
	endfor
endfunction